//pause the game
{
    if (keyboard_check_pressed(ord("P"))) {
        if(instance_exists(player)){
            pauseon = true; 
            pauseback = background_create_from_surface(application_surface,0,0,800,608,0,0);
            if(getBossRoom() == true){
                FMODInstanceSetPaused(curMusic,1);
            }
            else{
                FMODInstanceSetVolume(curMusic,global.audio_music_volume/100);
            }
            instance_deactivate_all(true);
        }
    }
}
